package com.aotain.nyx.flink;

import java.util.ArrayList;
import java.util.List;

import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.streaming.api.collector.selector.OutputSelector;

public class SourceDataSelector implements OutputSelector<Tuple2<String,String>>{


	/** 
	 * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
	 */ 
	private static final long serialVersionUID = -4094770370236202307L;

	@Override
	public Iterable<String> select(Tuple2<String,String> value) {

		String flag = value.f0;
		List<String> output = new ArrayList<String>();
		if("DipStream".equals(flag)) {
			output.add("DipStream");
		}else if("SipStream".equals(flag)) {
			output.add("SipStream");
		}else if("MetisDipStream".equals(flag)) {
			output.add("MetisDipStream");
		}else if("MetisSipStream".equals(flag)) {
			output.add("MetisSipStream");
		}
		return output;
	}

}
